package paywithdrawlogic

import (
	"context"

	modelWithdraw "gitee.com/liuxuezhan/ar-platform/assets-rpc/internal/dao/model/withdraw"
	"gitee.com/liuxuezhan/ar-platform/assets-rpc/internal/svc"
	"gitee.com/liuxuezhan/ar-platform/assets-rpc/rpc"
	"github.com/zeromicro/go-zero/core/logx"
)

type WithdrawSuccessLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewWithdrawSuccessLogic(ctx context.Context, svcCtx *svc.ServiceContext) *WithdrawSuccessLogic {
	return &WithdrawSuccessLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *WithdrawSuccessLogic) WithdrawSuccess(in *rpc.SuccessWithDrawReq) (*rpc.SuccessWithDrawRes, error) {
	w := modelWithdraw.NewWithdrawModel(l.ctx, l.svcCtx)
	return w.WithdrawSuccess(in)
}
